#ifndef ENTRY_H
#define ENTRY_H
#include <QtCore\Qdatetime.h>
#include <QString>
using namespace std;
class Entry
{
	string _name;
	QDate _endDate;
	QTime _endTime;

	
	friend class EntryManager;
protected:
	static const QString FORMAT_DATE;
	static const QString FORMAT_TIME;
	static const QDate EMPTY_DATE;
	static const QTime EMPTY_TIME;
	static const string EMPTY_STRING;
	string _entryType;
	static Entry* _instance;
public:
	static Entry* getInstance();
	static const int NUM_ATTRIBUTES=3;
	Entry(string, string, string);
	Entry(string,QDate,QTime);
	Entry();
	~Entry(void);
	QDate getEndDate() const;
	QTime getEndTime() const;
	string getName() const;
	void setName(string);
	void setEndDate(QDate);
	void setEndTime(QTime);
	bool isEmpty();
	virtual bool isConflict(Entry*){return false;};
	virtual QDate getStartDate() const {return QDate();}
	virtual QTime getStartTime() const {return QTime();}
	virtual void setStartDate(QDate){return;}
	virtual void setStartTime(QTime) {return;}
	virtual string toString(){return "";}
	virtual bool operator==(Entry*) {return false;}
	virtual bool setDone() {return false;}
	virtual bool getStatus() const {return false;}
	virtual bool isFloat() const;
	virtual bool isSpanning() const;
	virtual bool isPast(QDateTime = QDateTime::currentDateTime()) const;
	virtual bool isOccuring(QDate = QDate::currentDate()) const;
	virtual string getStatusString() const {return "";}
	virtual string getEntryType() const {return "";}
	virtual string getSearchString() const {return "";}
	virtual int getAttributeCount() const {return 3;}
	
};

#endif